<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>品牌联盟</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<script type="text/javascript">
			document.write('<script src="../../js/mount.js?rd=?rd=' + Math.random() + '"><\/script>');
		</script>
		<script type="text/javascript">
			link(2);
		</script>
	</head>
	<body id="app">
		<div class="state-container">
			<div v-if="isSuccess==0" class="state-icon state-payfailed"></div>
			<div v-if="isSuccess==1" class="state-icon state-paysuccess"></div>
			<div class="state-title">
				支付成功
			</div>
			<div class="state-subtitle">
				恭喜你支付成功<br />
				感谢您对品牌联盟的支持！
			</div>
			<div class="state-btns">
				<a date-href="toOrder" type="button" class="mui-btn mui-btn-danger mui-btn-outlined">查看订单</a>
				<a date-href="toHome" type="button" class="mui-btn mui-btn-danger">返回首页</a>
			</div>
		</div>
		<script type="text/javascript">
			script(2);
		</script>
		<script type="text/javascript">
			mui.init();
			var Info = new Vue({
				el: "#app",
				data: {
					isSuccess: 0,
				}
			})
			mui.back = function() {
				// plus.webview.currentWebview().close();
			};
			mui.plusReady(function() {
				var self = plus.webview.currentWebview();
				Info.isSuccess = self.isSuccess;
				mui(".state-btns").on("tap", "a", function(event) {
					var href = $(this).attr("date-href");
					UIAPI.closePages([
						"goods-detail.html",//商品详情
						"search.html",//商品搜索页
						"class-menu.html",//商品搜索页侧滑栏
						"settlement.html",//购物车 确认订单
						"order-detail.html",//订单详情
						"order-list.html",
						"payment.html",//支付页面
					]);
					
					if ("toOrder" == href) {
						var extras = {
							Status: "",
							OrderID:self.OrderID
						}
						UIAPI.openWindowWithTitle("../order/order-detail.html", "order-detail.html", extras)
						plus.webview.currentWebview().close();
					} else {
						var main = plus.webview.getLaunchWebview();
						mui.fire(main, 'refresh', {
							index: 0
						});
						plus.webview.currentWebview().close();
					}
				})
			})
		</script>
	</body>

</html>
